package com.wing.purchase.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.common.utils.JsonResult;
import com.wing.purchase.model.entity.SupplierContacts;
import com.wing.purchase.model.request.SupplierContactsForm;
import com.wing.purchase.model.request.SupplierDetailConcatExcelInForm;
import com.wing.purchase.model.request.SupplierDetailExcelInForm;
import com.wing.purchase.model.response.SupplierContactsVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 供应商联系人表-Service
 *
 * @author
 */
public interface SupplierContactsService extends IService<SupplierContacts> {

    /**
     * 添加
     *
     * @param supplierContactsForm
     * @return
     */
    int add(SupplierContactsForm supplierContactsForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<SupplierContactsVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<SupplierContactsVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    SupplierContactsVO get4appById(Long id);

    boolean removeBySupId(Long supplierInfoId);



    /**
     * 模板下载
     * @param response
     * @param request
     * @throws IOException
     */
    void template(HttpServletResponse response, HttpServletRequest request) throws IOException;


    /**
     * 导入供应商联系人
     * @param list
     * @return
     */
    public JsonResult importExcel(List<SupplierDetailConcatExcelInForm> list);

}
